import taichi as ti

enable_projection = True

ti.init()
x = ti.field(dtype=ti.f32,shape=10)

@ti.kernel
def static():
    if ti.static(enable_projection):
        x[0] = 1

static()
print(x)